import { useHistory } from 'react-router-dom'

export default function Search(props) {
  const history = useHistory()

  const handleClick = () => {
    // console.log(props.history)
    // props.history.push('/')
    history.push('/')
  }
  return (
    <div>
      评论
      <button onClick={handleClick}>跳转</button>
    </div>
  )
}
